//
//  HMComposeBtn.swift
//  webo
//
//  Created by apple on 2016/11/21.
//  Copyright © 2016年 apple. All rights reserved.
//

import UIKit
let composeIconbtnwidth:CGFloat = 80
let composeIconbtnheight:CGFloat = 110
class HMComposeBtn: UIButton {

    override init(frame: CGRect) {
        super.init(frame: frame)
        self.titleLabel?.textAlignment = .center
        self.titleLabel?.font = UIFont.systemFont(ofSize: 12)
        self.titleLabel?.textColor = UIColor.red
//        self.backgroundColor = UIColor.red
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y:composeIconbtnwidth , width: composeIconbtnwidth,height: composeIconbtnheight - composeIconbtnwidth)
    }
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
     return CGRect(x: 0, y: 0, width: composeIconbtnwidth, height: composeIconbtnwidth)
    }
    
}
